#include "Queue.h"

void TestQueue()
{
	Queue q;
	QueueInit(&q);
	QueuePush(&q, 1);
	QueuePush(&q, 2);
	QueuePush(&q, 3);
	QueuePush(&q, 4);
	while (!QueueEmpty(&q))
	{
		printf("%d ", QueueFront(&q));
		QueuePop(&q);
	}
	printf("\n");
	QueueDestory(&q);
}

void wuban()
{
    Queue men;
    Queue women;
    QueueInit(&men);
    QueueInit(&women);
    QueuePush(&men, 1);
    QueuePush(&men, 2);
    QueuePush(&men, 3);
    QueuePush(&men, 4);
    QueuePush(&men, 5);
    QueuePush(&men, 6);
    QueuePush(&women, 11);
    QueuePush(&women, 12);
    QueuePush(&women, 13);
    QueuePush(&women, 14);
    QueuePush(&women, 15);
    while (!QueueEmpty(&men) && !QueueEmpty(&women))
    {
        printf("%d ", QueueFront(&men));
        printf("%d \n", QueueFront(&women));
        QueuePop(&men);
        QueuePop(&women);
    }
}

int main()
{
	//TestQueue();
    wuban();
	return 0;
}